{{extend "ui_demo_layout.html"}}

{{block sidemenu}}
{{<< sidemenu('UIMENU', 'ag-grid', 'basic')}}
{{end}}

{{block content_main}}
{{use "ui.ag-grid"}}
{{link "modules/ag-grid/tags/grid.js"}}

<ag-grid></ag-grid>

<script>
    var columnDefs = [
        {headerName: "Make", field: "make"},
        {headerName: "Model", field: "model"},
        {headerName: "Price", field: "price"}
    ];

    var rowData = [
        {make: "Toyota", model: "Celica", price: 35000},
        {make: "Ford", model: "Mondeo", price: 32000},
        {make: "Porsche", model: "Boxter", price: 72000}
    ];

    var gridOptions = {
        columnDefs: columnDefs,
        rowData: rowData
    };


    riot.mount('ag-grid', {options:gridOptions})
</script>
{{end}}